package com.k.kppcloud.gateway.controller;

import com.k.kppcloud.gateway.service.NacosService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/nacos")
public class NacosController {
    @Autowired
    private NacosService nacosService;
    @RequestMapping("/test")
    @ResponseBody
    public Map<String,Object> test(){
        List<String> list = nacosService.queryAllInstances();
        System.out.println(list);

        Map<String,Object> ret = new HashMap<>();
        return ret;
    }
}
